<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;

/**
 * 模型关联一对一 多态
 * Class MorphTest
 * @package App\Console\Commands
 */
class MorphTest extends Command
{

    protected $signature = 'morph:test';


    public function handle()
    {

        $res = \App\Post::find(1);
//        \Log::info($res->image);

        $res = \App\User::find(13);
//        \Log::info($res->image);

        $res = \App\Model\Image::find(1);
        \Log::info($res->imageable);

    }
}
